<template>
  <el-dialog
    :title="title"
    :visible.sync="visible"
    width="576px"
    :close-on-click-modal="false"
    @close="close"
  >
    <el-form ref="form" label-width="100px" :model="info" :rules="rules">
      <el-row type="flex" class="flex-row">
        <el-col :span="24">
          <el-form-item label="columns1" prop="columns1">
            <el-input v-model="info.columns1" maxlength="100" size="small" />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="columns2" prop="columns2">
            <el-input v-model="info.columns2" maxlength="100" size="small" />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="columns3" prop="columns3">
            <el-input v-model="info.columns3" maxlength="100" size="small" />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="columns4" prop="columns4">
            <el-select v-model="info.columns4" multiple clearable placeholder="状态" size="small">
              <el-option label="全选" value="" />
              <el-option label="启用" value="1" />
              <el-option label="禁用" value="0" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="columns5" prop="columns5" size="small">
            <el-select-tree
              v-model="info.columns5"
              placeholder="请选择内容"
              :data="treeData"
              multiple
              clearable
            />
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button size="small" @click="close">取 消</el-button>
      <el-button size="small" type="primary" :loading="loading" @click="submit">确 定</el-button>
    </span>
  </el-dialog>
</template>

<script>
import BasicDialog from '@/libs/mixin/BasicDialog'

export default {
  mixins: [BasicDialog],
  data() {
    return {
      info: {
        columns5: []
      },
      treeData: [
        { value: 1, label: 'data1' },
        { value: 2, label: 'data2' },
        { value: 3, label: 'data3' },
        { value: 4, label: 'data4' },
        { value: 5, label: 'data5' },
        { value: 6, label: 'data6' }
      ],
      loading: false,
      rules: {
        columns1: [{ required: true, trigger: 'blur', message: '请输入columns1' }]
      }
    }
  },
  methods: {
    init() {},
    submit() {},
    close() {
      this.visible = false
    }
  }
}
</script>

<style>

</style>
